#include "coordinate.h"
#include <iostream>

using namespace std;

Coordinate::Coordinate()
{
    // 无参构造
    this->mX = 0;
    this->mY = 0;
}

Coordinate::Coordinate(int x, int y)
{
    // 有参构造
    this->mX = x;
    this->mY = y;
}

Coordinate::Coordinate(const Coordinate &ob)
{
    // 拷贝构造
    this->mX = ob.mX;
    this->mY = ob.mY;
}

Coordinate::~Coordinate()
{
    // 析构函数
}

void Coordinate::showX(void)
{
    cout << "X" << mX << endl;
    return;
}

void Coordinate::showY(void)
{
    cout << "Y" << mY << endl;
    return;
}

int Coordinate::getX(void)
{
    return mX;
}

int Coordinate::getY(void)
{
    return mY;
}